// v-md-editor编辑器
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

// Tip 提示插件
// import createTipPlugin from '@kangc/v-md-editor/lib/plugins/tip/index';
// import '@kangc/v-md-editor/lib/plugins/tip/tip.css';

// Emoji 表情插件
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index';
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css';

// todo-list 插件来支持插入 任务列表
import createTodoListPlugin from '@kangc/v-md-editor/lib/plugins/todo-list/index';
import '@kangc/v-md-editor/lib/plugins/todo-list/todo-list.css';

// line-number 插件来支持显示代码行号
import createLineNumbertPlugin from '@kangc/v-md-editor/lib/plugins/line-number/index';

// Highlight Lines 高亮代码行
import createHighlightLinesPlugin from '@kangc/v-md-editor/lib/plugins/highlight-lines/index';
import '@kangc/v-md-editor/lib/plugins/highlight-lines/highlight-lines.css';

// Copy Code 快捷复制代码
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index';
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css';

// align 插件来支持设置内容的水平位置：
import createAlignPlugin from '@kangc/v-md-editor/lib/plugins/align';


import Prism from 'prismjs';
/* 如果要支持高亮java语言的话，需要引入这个，其它的语言需要引入prism-{language}
   否则，无法处理java语言。 */
import 'prismjs/components/prism-java';  

VueMarkdownEditor.use(vuepressTheme, {
    Prism,
    // codeHighlightExtensionMap: { // 扩展代码高亮的类型
    //     vue: 'xml',
    // },
    config: {
        toc: {
          includeLevel: [1, 2, 3, 4, 5, 6], // 配置 toc 生成导航时包含的标题，默认值为[2, 3]。
        },
      },
});
// VueMarkdownEditor.use(createTipPlugin());
VueMarkdownEditor.use(createEmojiPlugin());
VueMarkdownEditor.use(createTodoListPlugin());
VueMarkdownEditor.use(createLineNumbertPlugin());
VueMarkdownEditor.use(createHighlightLinesPlugin());
VueMarkdownEditor.use(createCopyCodePlugin());
VueMarkdownEditor.use(createAlignPlugin());



export default VueMarkdownEditor